﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Shiny.SmartTravel.Data.Local
{
    /// <summary>
    /// The settings of local data
    /// </summary>
    public static class Settings
    {
        private static string localDataFolder;
        private static string localMapsFolder;

        /// <summary>
        /// The local data folder from app.config
        /// </summary>
        public static string LocalDataFolder
        {
            get
            {
                try
                {
                    localDataFolder = ConfigurationManager.AppSettings["localDataFolder"];
                }
                catch (Exception ex)
                {
                    throw new LocalDataException("LocalDataSettings.LocalDataFolder Error!", ex);
                }

                return localDataFolder;
            }
        }

        /// <summary>
        /// Gets the local maps folder settings value from the configuration file
        /// </summary>
        public static string LocalMapsFolder
        {
            get
            {
                try
                {
                    localMapsFolder = ConfigurationManager.AppSettings["localMapsFolder"];
                }
                catch (Exception ex)
                {
                    throw new LocalDataException("LocalDataSettings.LocalMapsFolder Error!", ex);
                }

                return localMapsFolder;
            }
        }
    }
}
